<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <h4 v-color>你好世界</h4>
    <input v-focus>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    Vue.directive('focus', {
      inserted(el){
        el.focus();
      }
    } )
    const app = new Vue({
      el: '#app',
      
    })
  </script>
</body>
</html>